package com.daxue.design.singleton;

/**
 * @author daxue0929
 * @date 2023/2/3
 * 懒汉式（线程安全,同步方法）
 *
 *
 *
 *  https://blog.csdn.net/fyj13925475957/article/details/103287327
 *
 *  这个地址还要继续学习 todo...
 *
 */

public class SingleTon04 {
    private SingleTon04() {}

    private static SingleTon04 singleTon04;

    public static synchronized SingleTon04 getInstance() {
        if (singleTon04 == null) {
            singleTon04 = new SingleTon04();
        }
        return singleTon04;
    }
}
